#!/bin/sh

mkdir -p ios/build

rm -rf ios/build/archive.xcarchive ios/build/ipa-*

xcodebuild -workspace ./ios/gjmobile.xcworkspace -configuration Release -scheme gjmobile   clean build archive -derivedDataPath "./ios/build" -archivePath "./ios/build/archive.xcarchive" -quiet

xcodebuild -exportArchive -archivePath ./ios/build/archive.xcarchive -exportPath ./ios/build/ipa-enterprise -exportOptionsPlist ./ios/enterprise.plist -allowProvisioningUpdates
